package com.jecy.utils;


import org.springframework.security.authentication.encoding.Md5PasswordEncoder;

/**
 * Created by huijun on 17/2/15.
 */
public class MD5Utils {


    public static final String UTF8 = "UTF-8";
    public static final String MD5 = "MD5";

    /***
     * 返回MD5加密字符串
     * @param input
     * @return
     */
    public static String md5Encode(String input) throws Exception {

        Md5PasswordEncoder md5PasswordEncoder = new Md5PasswordEncoder();
        return md5PasswordEncoder.encodePassword(input, null);
    }

}
